package com.baizhi.dto;

import lombok.Data;

import java.util.List;

/**
 * Created by Administrator on 2019/4/22.
 */
@Data
public class PowerDto {
    private Integer id;
    private String name;
    private List<PowerDto> children;

    /*
    * select tc1.1id,tc1.1name,tc1.1id tc1,tc1.2id 2id,tc1.2name 2name,tc2.resource_id 3id,tc2.resource_name 3name FROM
(select t5.1id,t5.1name,ta4.resource_id 2id,ta4.resource_name 2name from
(select t4.resource_id 1id,t4.resource_name 1name FROM
(SELECT t3.resource_id,t3.resource_name,t3.resource_parent_id from
(select t1.resource_id from cmfz_role_resource t1 where  t1.role_name='superadmin')t2
LEFT JOIN cmfz_resource t3 ON t2.resource_id=t3.resource_id )t4 where t4.resource_parent_id is NULL)t5
  LEFT JOIN
(SELECT ta3.resource_id,ta3.resource_name,ta3.resource_parent_id from
(select ta1.resource_id from cmfz_role_resource ta1 where ta1.role_name='superadmin')ta2
LEFT JOIN cmfz_resource ta3 ON ta2.resource_id=ta3.resource_id)ta4
ON t5.1id=ta4.resource_parent_id)tc1
LEFT JOIN
(SELECT ta3.resource_id,ta3.resource_name,ta3.resource_parent_id from
(select ta1.resource_id from cmfz_role_resource ta1 where ta1.role_name='superadmin')ta2
LEFT JOIN cmfz_resource ta3 ON ta2.resource_id=ta3.resource_id)tc2
ON tc1.2id=tc2.resource_parent_id*/
}
